const MayBe = require('folktale/maybe')

const toRMB = v => MayBe.of(v)
.map(v => v.replace('$', ''))
.map(parseFloat)
.map(v => v * 7)
.map(v => v.toFixed(2))
.map(v => '¥' + v)
.unsafeGet()
//使用 unsafeGet 方法不能兼容 传值null的情况
// console.log(toRMB('$299.9'))
console.log(toRMB(null))
















